package com.business;

import cn.edu.hfut.dmic.contentextractor.ContentExtractor;
import cn.edu.hfut.dmic.webcollector.example.DemoBingCrawler;
import cn.hutool.Hutool;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ReUtil;
import cn.hutool.http.HttpUtil;
import com.ruoyi.common.core.redis.RedisCache;
import org.apache.commons.lang3.builder.ToStringExclude;
import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test {
    public static void main(String[] args) {
        // String result1= HttpUtil.get("https://www.huxiu.com/article/121959.html");
        // System.out.println(result1);

        // //请求列表页
        // String listContent = HttpUtil.get("https://www.huxiu.com/article/121959.html");
        // //使用正则获取所有标题
        // List<String> titles = ReUtil.findAll("<span class=\"article-content\">(.*?)</span>", listContent, 1);
        // for (String title : titles) {
        //     //打印标题
        //     Console.log(title);
        // }

        RedisCache redisCache = new RedisCache();
        // redisCache.setCacheObject("姓名","黄山");

        // redisCache.setCacheList("姓名",new ArrayList<String>("邢明明",));
        // redisCache.setCacheList("姓名",new ArrayList<String>("邢明明",));
        redisCache.getCacheSet("334444444");


        System.out.println(redisCache.getCacheObject("姓名").toString());


    }
}
